import Vue from 'vue'
import App from './App.vue'
import "bootstrap/dist/css/bootstrap.css"
import "./assets/fonts/iconfont.css"
import axios from 'axios'
import MyGoodsList from './views/MyGoodsList.vue'
import MyGoodsSearch from './views/MyGoodsSearch.vue'
import MyUserInfo from './views/MyUserInfo.vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

axios.defaults.baseURL = 'https://www.escook.cn'

Vue.prototype.$axios = axios
Vue.config.productionTip = false
Vue.directive('autoFocus', {
  inserted(el) {
    el.focus()
  }
})

Vue.use(VueRouter)

const routes = [
  {
    path: '/', 
    redirect: '/MyGoodsList'
  },
  {
    path:'/MyGoodsList',
    components:MyGoodsList
  },
  {
    path:'/MyGoodsSearch',
    components:MyGoodsSearch
  },
  {
    path:'/MyUserInfo',
    components:MyUserInfo
  },
]
const router = new VueRouter({
  routes,
})

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
